/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.							  */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
/*----------------------------------------------------------------------------*/
#ifndef VICTOR_H
#define VICTOR_H

#include "PWM.h"
#include "SpeedController.h"

/**
 * IFI Victor Speed Controller
 */
class Victor : public PWM, public SpeedController
{
public:
	Victor(unsigned channel);
	Victor(unsigned slot, unsigned channel);
	virtual ~Victor();
	void EnableDeadbandElimination(bool eliminateDeadband);
	void Set(float value);
	float Get(void);

private:
	void InitVictor(void);

	static const int kMaxPwm = 206;
	static const int kDeadbandMaxPwm = 138;
	static const int kCenterPwm = 132;
	static const int kDeadbandMinPwm = 126;
	static const int kMinPwm = 61;
};

#endif

